/*
 *------------------------------------------------------------------------------
 * @File      :    ei_mai_camera_define.h
 * @Date      :    2021-4-8
 * @Author    :    lomboswer <lomboswer@lombotech.com>
 * @Brief     :    Media Interface for MADP(Media Development Platform).
 *
 * Copyright (C) 2020-2021, LomboTech Co.Ltd. All rights reserved.
 *------------------------------------------------------------------------------
 */

#ifndef __EI_MAI_CAMERA_DEFINE_H__
#define __EI_MAI_CAMERA_DEFINE_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* End of #ifdef __cplusplus */

/** \addtogroup     CAMERA */
/** @{ */  /** <!-- [CAMERA] */

#include "ei_comm_camera.h"
#include "ei_comm_isp.h"

#include "ei_mai_comm_define.h"
#include "ei_mai_errno.h"

/** Max length of exif description*/
#define EI_SNAP_EXIF_DRSCRIPTION_LENGTH 32
/** Max frame num used to protune*/
#define EI_SNAP_PRO_MAX_FRAME_NUM    8
#define EI_SNAP_PRO_MIN_FRAME_NUM    1
/** Max num of osd region*/
#define EI_CAMERA_OSD_MAX_NUM 4
/** Max camera num*/
#define EI_CAMERA_MAX_NUM 2
#define EI_SENSOR_MAX_NUM 2

#define EI_MADP_CAMERA_MAX_BRIGHTNESS 100
#define EI_MADP_CAMERA_MIN_BRIGHTNESS 0

#define EI_MADP_CAMERA_MAX_SATURATION 100
#define EI_MADP_CAMERA_MIN_SATURATION 0

#define EI_MADP_CAMERA_MAX_SHARPEN_ST 255
#define EI_MADP_CAMERA_MIN_SHARPEN_ST 0

#define EI_MADP_CAMERA_MAX_COLORTEMP 15000
#define EI_MADP_CAMERA_MIN_COLORTEMP 1500

#define EI_MADP_CAMERA_MAX_LDC_CENTERX_OFFSET 127
#define EI_MADP_CAMERA_MIN_LDC_CENTERX_OFFSET -127

#define EI_MADP_CAMERA_MAX_LDC_CENTERY_OFFSET 127
#define EI_MADP_CAMERA_MIN_LDC_CENTERY_OFFSET -127

#define EI_MADP_CAMERA_MAX_LDC_RATIO 300
#define EI_MADP_CAMERA_MIN_LDC_RATIO -300

#define EI_MADP_CAMERA_MAX_LDC_MINRATIO 0
#define EI_MADP_CAMERA_MIN_LDC_MINRATIO -300

#define EI_MADP_CAMERA_MAX_RAWDUMP_DEPTH 8
#define EI_MADP_CAMERA_MIN_RAWDUMP_DEPTH 0

#define EI_MADP_CAMERA_SYSGAIN_MIN 0x400
#define EI_MADP_CAMERA_SYSGAIN_MAX 0xFFFFFFFF

#define EI_MADP_CAMERA_MAX_EVBIAS 0xFFFF
#define EI_MADP_CAMERA_MIN_EVBIAS 0x0

/** WDR mode*/
typedef enum eiEI_MADP_WDR_MODE_E
{
    EI_MADP_WDR_MODE_NONE = 0,
    EI_MADP_WDR_MODE_BUILT_IN,
    EI_MADP_WDR_MODE_2To1_LINE,
    EI_MADP_WDR_MODE_2To1_FRAME,
    EI_MADP_WDR_MODE_2To1_FRAME_FULL_RATE,
    EI_MADP_WDR_MODE_3To1_LINE,
    EI_MADP_WDR_MODE_3To1_FRAME,
    EI_MADP_WDR_MODE_3To1_FRAME_FULL_RATE,
    EI_MADP_WDR_MODE_4To1_LINE,
    EI_MADP_WDR_MODE_4To1_FRAME,
    EI_MADP_WDR_MODE_4To1_FRAME_FULL_RATE,
    EI_MADP_WDR_MODE_BUTT
}EI_MADP_WDR_MODE_E;

/** sensor attribute*/
typedef struct eiEI_MADP_SENSOR_ATTR_S
{
    EI_S32 s32FrameRate;
    EI_MADP_RESOLUTION_S stResolution;
    EI_MADP_WDR_MODE_E enWdrMode;
} EI_MADP_SENSOR_ATTR_S;

typedef struct eiEI_MADP_SENSOR_FOV_INFO_S
{
    EI_S32 s32SrcFrameRate;
    EI_MADP_RESOLUTION_S stSrcResolution;
    EI_S32 s32DstFrameRate;
    EI_MADP_RESOLUTION_S stDstResolution;
}EI_MADP_SENSOR_FOV_INFO_S;

typedef enum eiEI_MADP_SENSOR_MODE_E
{
    EI_MADP_SENSOR_MODE_STANDBY,
    EI_MADP_SENSOR_MODE_NORMAL,
    EI_MADP_SENSOR_MODE_BUTT
}EI_MADP_SENSOR_MODE_E;

typedef enum eiEI_MADP_CAMERA_TYPE_E
{
    EI_MADP_CAMERA_TYPE_VIDEO = 0,
    EI_MADP_CAMERA_TYPE_SNAP,
    EI_MADP_CAMERA_TYPE_BUTT
}EI_MADP_CAMERA_TYPE_E;


/** EI_MADP_CAMERA_CMD_SetFlip,EI_MADP_CAMERA_CMD_GetFlip*/
typedef struct eiCAMERA_FLIP_ATTR_S
{
    EI_BOOL bEnable;
}EI_CAMERA_FLIP_ATTR_S;


/** EI_MADP_CAMERA_CMD_SetMirror,EI_MADP_CAMERA_CMD_SetMirror*/
typedef struct eiCAMERA_MIRROR_ATTR_S
{
    EI_BOOL bEnable;
}EI_CAMERA_MIRROR_ATTR_S;


typedef struct ei_CAMERA_DEV_INFO_S {
	VISS_DEV    VissDev;
	WDR_MODE_E  enWDRMode;
	VISS_CHN    aBindPhyChn[VISS_DEV_MAX_CHN_NUM];
	VISS_OUT_PATH_E enOutPath;    /* 0: DMA 1:ISP */
} EI_CAMERA_DEV_INFO_S;

typedef struct ei_CAMERA_ISP_INFO_S {
    ISP_DEV             IspDev;
    EI_BOOL             bIspBypass;
    ISP_RUNNING_MODE_E  enRunningMode;
    RECT_S              stCrop;
    EI_CHAR             *pcParamName;
} EI_CAMERA_ISP_INFO_S;

typedef struct ei_CAMERA_CHN_INFO_S {
	VISS_CHN            aVissChn[VISS_DEV_MAX_CHN_NUM];
	VISS_WORK_MODE_E    enWorkMode;
	PIXEL_FORMAT_E      enPixFormat;
	VIDEO_FORMAT_E      enVideoFormat;
	COMPRESS_MODE_E     enCompressMode;
} EI_CAMERA_CHN_INFO_S;

/** video capture attribute*/
typedef struct eiEI_MADP_CAMERA_ATTR_S
{
    SNS_TYPE_E enSnsType;
    EXT_DEV_TYPE_E enExtDevType;
    EI_S32 s32FrameRate;
    EI_MADP_RESOLUTION_S stResolution;
    WDR_MODE_E enWdrMode;
    PIXEL_FORMAT_E enPixelFormat;
    EI_CAMERA_DEV_INFO_S stDevInfo;
    EI_CAMERA_ISP_INFO_S stIspInfo;
    EI_CAMERA_CHN_INFO_S stChnInfo;
    EI_S32 s32VissDev;
    EI_BOOL enExtraAttrs;
    EI_U32 u32Depth;
    EI_U32 u32AfEnable;
} EI_MADP_CAMERA_ATTR_S;

typedef struct eiEI_MADP_CAMERA_DUMP_ATTR_S
{
    EI_MADP_PIXEL_FORMAT_E enPixelForamt;            /**< [8bit,10bit,12bit,14bit,16bit]*/
    EI_U32 u32Depth;                                /**< [0,8]*/
}EI_MADP_CAMERA_DUMP_ATTR_S;

/** video capture setting command*/
typedef enum eiEI_MADP_CAMERA_CMD_E
{
    /*EI_MADP_CAMERA_CMD_SetExposure,
    EI_MADP_CAMERA_CMD_GetExposure,
    EI_MADP_CAMERA_CMD_SetWBAttr,
    EI_MADP_CAMERA_CMD_GetWBAttr,
    EI_MADP_CAMERA_CMD_SetSharpen,
    EI_MADP_CAMERA_CMD_GetSharpen,
    EI_MADP_CAMERA_CMD_SetBrightness,
    EI_MADP_CAMERA_CMD_GetBrightness,
    EI_MADP_CAMERA_CMD_SetSaturation,
    EI_MADP_CAMERA_CMD_GetSaturation,
    EI_MADP_CAMERA_CMD_SetLDC,
    EI_MADP_CAMERA_CMD_GetLDC,*/
    EI_MADP_CAMERA_CMD_SetRotate,
    EI_MADP_CAMERA_CMD_GetRotate,
    EI_MADP_CAMERA_CMD_SetMirror,
    EI_MADP_CAMERA_CMD_GetMirror,
    EI_MADP_CAMERA_CMD_SetFlip,
    EI_MADP_CAMERA_CMD_GetFlip,
    /*EI_MADP_CAMERA_CMD_QUERY_EXPOSURE_INFO,
    EI_MADP_CAMERA_CMD_ISP_SetPipeDiffAttr,
    EI_MADP_CAMERA_CMD_ISP_GetPipeDiffAttr,
    EI_MADP_CAMERA_CMD_ISP_SetMode,
    EI_MADP_CAMERA_CMD_QUERY_WB_INFO,
    EI_MADP_CAMERA_CMD_ISP_INIT,*/
    EI_MADP_CAMERA_CMD_CreateOsd,
    EI_MADP_CAMERA_CMD_CreateRect,
    EI_MADP_CAMERA_CMD_SetRect,
    EI_MADP_CAMERA_CMD_CreateMosaic,
    EI_MADP_CAMERA_CMD_CreateCover,
    EI_MADP_CAMERA_CMD_DestroyOsd,
    EI_MADP_CAMERA_CMD_DestroyRect,
    EI_MADP_CAMERA_CMD_DestroyMosaic,
    EI_MADP_CAMERA_CMD_DestroyCover,
    EI_MADP_CAMERA_CMD_BUTT
}EI_MADP_CAMERA_CMD_E;

typedef struct eiCAMERA_ATTREX_S
{
    EI_HANDLE handle;			/* handle for Osd, rect, cover, 0 ~ 127*/
    union {
        EI_MADP_FLIP_MIRROR_E stFlip;
        EI_MADP_ROTATE_E stRotate;
        EI_MADP_OSD_ATTR_S stOsdAttr;
        EI_MADP_RECT_ATTR_S stRectAttr;
        EI_MADP_MOSAIC_ATTR_S stMosaicAttr;
        EI_MADP_COVER_ATTR_S stCoverAttr;
    };
} CAMERA_ATTREX_S;

/** operation type*/
typedef enum eiEI_MADP_CAMERA_OP_TYPE_E
{
    EI_MADP_CAMERA_OP_TYPE_AUTO = 0,
    EI_MADP_CAMERA_OP_TYPE_MANUAL = 1,
    EI_MADP_CAMERA_OP_TYPE_DISABLE = 2,
    EI_MADP_CAMERA_OP_TYPE_BUTT
} EI_MADP_CAMERA_OP_TYPE_E;

/** manual exposure attribute*/
typedef struct eiEI_MADP_CAMERA_EXPOSURE_MANUAL_MODE_S
{
    EI_MADP_CAMERA_OP_TYPE_E enExpTimeOpType;
    EI_MADP_CAMERA_OP_TYPE_E enAGainOpType;
    EI_MADP_CAMERA_OP_TYPE_E enDGainOpType;
    EI_MADP_CAMERA_OP_TYPE_E enISPDGainOpType;
    EI_U32 u32ExposureTime;     /**< Unit:us*/
    EI_U32 u32AGain;            /*Add*/
    EI_U32 u32DGain;            /*Add*/
    EI_U32 u32ISPDGain;         /*Add*/
} EI_MADP_CAMERA_EXPOSURE_MANUAL_MODE_S;

typedef struct eiEI_MADP_CAMERA_AE_RANGE_S
{
    EI_U32 u32Min;
    EI_U32 u32Max;
}EI_MADP_CAMERA_AE_RANGE_S;

typedef struct eiEI_MADP_CAMERA_EXPOSURE_AUTO_MODE_S
{
    EI_U32 u32EVBias;           /**< [0,0xFFFF] */
    EI_MADP_CAMERA_AE_RANGE_S stSysGainRange;      /**ISO*/
}EI_MADP_CAMERA_EXPOSURE_AUTO_MODE_S;

/** exposure attribute.EI_MADP_CAMERA_CMD_SetExposure,EI_MADP_CAMERA_CMD_GetExposure*/
typedef struct eiEI_MADP_CAMERA_EXPOSURE_ATTR_S
{
    EI_MADP_CAMERA_OP_TYPE_E enOpType;
    EI_MADP_CAMERA_EXPOSURE_MANUAL_MODE_S stMExposureMode;
    EI_MADP_CAMERA_EXPOSURE_AUTO_MODE_S stAExposureMode;
} EI_MADP_CAMERA_EXPOSURE_ATTR_S;

/** The current exposure info.EI_MADP_CAMERA_CMD_QUERY_EXPOSURE_INFO*/
typedef struct eiMADP_CAMERA_EXPOSURE_INFO_S
{
    EI_U32 u32ExposureTime;
    EI_U32 u32AGain;
    EI_U32 u32DGain;
    EI_U32 u32IspDGain;
    EI_U32 u32Exposure;
    EI_U32 u32LinesPer500ms;
    EI_U32 u32PirisFNO;
}EI_MADP_CAMERA_EXPOSURE_INFO_S;

/** weite balance manual mode*/
typedef struct eiEI_MADP_CAMERA_WB_MANUAL_MODE_S
{
    EI_U32 u32ColorTemp;                /**< Unit:Kelvin,1500~15000*/
} EI_MADP_CAMERA_WB_MANUAL_MODE_S;

/** weite balance attribute.EI_MADP_CAMERA_CMD_SetWBAttr,EI_MADP_CAMERA_CMD_GetWBAttr*/
typedef struct eiEI_MADP_CAMERA_WB_ATTR_S
{
    EI_MADP_CAMERA_OP_TYPE_E enOpType;
    EI_MADP_CAMERA_WB_MANUAL_MODE_S stWBMode;
} EI_MADP_CAMERA_WB_ATTR_S;

typedef struct eiEI_MADP_CAMERA_SHARPEN_MANUAL_ATTR_S
{
    EI_S32 s32Sharpness;            /**> [0,255]*/
}EI_MADP_CAMERA_SHARPEN_MANUAL_ATTR_S;

/** shapren attribute.EI_MADP_CAMERA_CMD_SetSharpen,EI_MADP_CAMERA_CMD_GetSharpen*/
typedef struct eiEI_MADP_CAMERA_SHARPEN_S
{
    EI_MADP_CAMERA_OP_TYPE_E enOpType;
    EI_MADP_CAMERA_SHARPEN_MANUAL_ATTR_S stSharpenManualAttr;
}EI_MADP_CAMERA_SHARPEN_S;

/** brightness attribute.EI_MADP_CAMERA_CMD_SetBrightness,EI_MADP_CAMERA_CMD_GetBrightness*/
typedef struct eiEI_MADP_CAMERA_BRIGHTNESS_S
{
    EI_S32 s32Brightness;           /**> [0,100]*/
}EI_MADP_CAMERA_BRIGHTNESS_S;

/** saturation attribute.EI_MADP_CAMERA_CMD_SetSaturation,EI_MADP_CAMERA_CMD_GetSaturation*/
typedef struct eiEI_MADP_CAMERA_SATURATION_S
{
    EI_S32 s32Saturation;           /**> [0,100]*/
}EI_MADP_CAMERA_SATURATION_S;

typedef enum eiEI_MADP_CAMERA_LDC_TYPE_E
{
    EI_MADP_CAMERA_LDC_TYPE_ALL = 0,
    EI_MADP_CAMERA_LDC_TYPE_CROP,
    EI_MADP_CAMERA_LDC_TYPE_BUTT
}EI_MADP_CAMERA_LDC_TYPE_E;

/** LDC attribute.EI_MADP_CAMERA_CMD_SetLDC,EI_MADP_CAMERA_CMD_GetLDC*/
typedef struct eiEI_MADP_CAMERA_LDC_ATTR_S
{
    EI_BOOL bEnable;
    EI_MADP_CAMERA_LDC_TYPE_E enLDCType;
    EI_S32 s32CenterXOffset;            /**< [-127,127] */
    EI_S32 s32CenterYOffset;            /**< [-127,127] */
    EI_S32 s32Ratio;                    /**< [-300,300] */
    EI_S32 s32MinRatio;                 /**< [-300,0],when enLDCType is EI_MADP_CAMERA_LDC_TYPE_CROP effective,s32Ratio>=s32MinRatio */
}EI_MADP_CAMERA_LDC_ATTR_S;

typedef enum ei_MADP_CAMERA_DIS_MOTION_TYPE_E
{
    EI_MADP_CAMERA_DIS_MOTION_4DOF_SOFT,
    EI_MADP_CAMERA_DIS_MOTION_6DOF_SOFT,   /**< Same as MovieSolid 3.x. */
    EI_MADP_CAMERA_DIS_MOTION_6DOF_HYBRID, /**< Same as MovieSolid 3.x. (Hybrid) */
    EI_MADP_CAMERA_DIS_MOTION_8DOF_HARD,   /**< Motion detection from gyroscope data only. */
    EI_MADP_CAMERA_DIS_MOTION_BUTT
}EI_MADP_CAMERA_DIS_MOTION_TYPE_E;

/** dis accuracy.*/
typedef enum eiEI_MADP_CAMERA_DIS_ACCURACY_E
{
    EI_MADP_CAMERA_DIS_ACCURACY_EIGH = 0,
    EI_MADP_CAMERA_DIS_ACCURACY_MIDDLE,
    EI_MADP_CAMERA_DIS_ACCURACY_LOW,
    EI_MADP_CAMERA_DIS_ACCURACY_BUTT
}EI_MADP_CAMERA_DIS_ACCURACY_E;

/** dis attribute.EI_MADP_CAMERA_CMD_SetDis,EI_MADP_CAMERA_CMD_GetDis*/
typedef struct eiEI_MADP_CAMERA_DisAttr_S
{
    EI_MADP_CAMERA_DIS_MOTION_TYPE_E enDisMotionType;
    EI_MADP_CAMERA_DIS_ACCURACY_E enDisAccuracy;
}EI_MADP_CAMERA_DisAttr_S;

/** GPS Info*/
typedef struct eiEI_MADP_GPS_INFO_S
{
    EI_CHAR  chGPSLatitudeRef;         /* GPS LatitudeRef Indicates whether the latitude is north or south latitude,
                                    * 'N'/'S', default 'N' */
    EI_U32   au32GPSLatitude[3][2];    /* GPS Latitude is expressed as degrees, minutes and seconds,a typical format like "dd/1,mm/1,ss/1",
                                    *  default 0/0, 0/0, 0/0 */
    EI_CHAR  chGPSLongitudeRef;        /* GPS LongitudeRef Indicates whether the longitude is east or west longitude,
                                    * 'E'/'W', default 'E' */
    EI_U32   au32GPSLongitude[3][2];   /* GPS Longitude is expressed as degrees, minutes and seconds,a typical format like "dd/1,mm/1,ss/1",
                                    *  default 0/0, 0/0, 0/0 */
    EI_U8    u8GPSAltitudeRef;         /* GPS AltitudeRef Indicates the reference altitude used, 0 - above sea level, 1 - below sea level
                                    * default 0 */
    EI_U32   au32GPSAltitude[2];       /* GPS AltitudeRef Indicates the altitude based on the reference u8GPSAltitudeRef, the reference unit is meters,
                                    * default 0/0 */
} EI_MADP_GPS_INFO_S;

/** exif info*/
typedef struct eiEI_MADP_SNAP_EXIF_INFO_S
{
    EI_U8 au8ImageDescription[EI_SNAP_EXIF_DRSCRIPTION_LENGTH];         /**<Describes image*/
    EI_U8 au8Make[EI_SNAP_EXIF_DRSCRIPTION_LENGTH];                 /**<Shows manufacturer of digital cameras*/
    EI_U8 au8Model[EI_SNAP_EXIF_DRSCRIPTION_LENGTH];                /**<Shows model number of digital cameras*/
    EI_U8 au8Software[EI_SNAP_EXIF_DRSCRIPTION_LENGTH];             /**<Shows firmware (internal software of digital cameras) version number*/
    EI_U32 u32MeteringMode;
    EI_U32 u32LightSource;
    EI_U32 u32FocalLength;
    EI_U8  u8FocalLengthIn35mmFilm;
    EI_MADP_GPS_INFO_S stGPSInfo;
} EI_MADP_SNAP_EXIF_INFO_S;

/** snap mode*/
typedef enum eiEI_MADP_SNAP_MODE_E
{
    EI_MADP_SNAP_MODE_NONE = 0,                                  /**<non snap mode*/
    EI_MADP_SNAP_MODE_NORMAL,                                    /**<single snap,burst snap,continues snap and lapse snap choose teis mode*/
    EI_MADP_SNAP_MODE_PROTUNE,                                   /**<Exposure attr*/
    EI_MADP_SNAP_MODE_NORMAL_ONLINE,
    EI_MADP_SNAP_MODE_PROTUNE_ONLINE,
    EI_MADP_SNAP_MODE_QUICK,
    EI_MADP_SNAP_MODE_BUTT
} EI_MADP_SNAP_MODE_E;

/** snap normal attribute*/
typedef struct eiEI_MADP_SNAP_NORMAL_ATTR_S
{
    EI_U32 u32FrameRate;                                            /**<snap framerate*/
}EI_MADP_SNAP_NORMAL_ATTR_S;

typedef enum eiEI_MADP_CAMERA_PROTUNE_OP_TYPE_E
{
    EI_MADP_CAMERA_PROTUNE_OP_TYPE_NONE =0,
    EI_MADP_CAMERA_PROTUNE_OP_TYPE_AUTO = 1,
    EI_MADP_CAMERA_PROTUNE_OP_TYPE_MANUAL = 2,
    EI_MADP_CAMERA_PROTUNE_OP_TYPE_BUTT
} EI_MADP_CAMERA_PROTUNE_OP_TYPE_E;

typedef struct eiEI_MADP_CAMERA_PROTUNE_MANUAL_ATTR_S
{
    EI_U32 au32ManExpTime[EI_SNAP_PRO_MAX_FRAME_NUM];/*RW,  sensor exposure time (unit: us ), Range: [0x0, EI_MADP_CAMERA_SNAP_PRO_MAX_MANEXPTIME], it's related to the specific sensor */
    EI_U32 au32ManSysgain[EI_SNAP_PRO_MAX_FRAME_NUM];/*RW,  system gain (unit: times, 10bit precision), Range : [0x400, 0xFFFFFFFF], it's related to the specific sensor and ISP Dgain range */
}EI_MADP_CAMERA_PROTUNE_MANUAL_ATTR_S;

typedef struct eiEI_MADP_CAMERA_PROTUNE_AUTO_ATTR_S
{
    EI_U16 au16ExpStep[EI_SNAP_PRO_MAX_FRAME_NUM];          /*RW,exposure step (unit: times, 8bit precision), Range:[0x0, 0xFFFF]*/
}EI_MADP_CAMERA_PROTUNE_AUTO_ATTR_S;

/** snap protune attribute*/
typedef struct eiEI_MADP_SNAP_PROTUNE_ATTR_S
{
    EI_MADP_CAMERA_PROTUNE_OP_TYPE_E enProOpType;
    EI_MADP_CAMERA_PROTUNE_MANUAL_ATTR_S stProManualAttr;
    EI_MADP_CAMERA_PROTUNE_AUTO_ATTR_S stProAutoAttr;
} EI_MADP_SNAP_PROTUNE_ATTR_S;

/** lowlight attribute.reserve*/
typedef struct eiEI_MADP_SNAP_LL_ATTR_S
{
    EI_U32 u32LLFrameNum;                                           /**<frame count for LL*/
} EI_MADP_SNAP_LL_ATTR_S;

/** snap attribute*/
typedef struct eiEI_MADP_SNAP_ATTR_S
{
    EI_BOOL bSnapInfoCCM;
    EI_U32 u32FrameCnt;
    union
    {
        EI_MADP_SNAP_NORMAL_ATTR_S stNormalAttr;
        EI_MADP_SNAP_PROTUNE_ATTR_S stProAttr;
    };
} EI_MADP_SNAP_ATTR_S;

typedef struct eiMADP_CAMERA_DIS_GYRO_DATA_S
{
    EI_DOUBLE     *pdRotX;      /**< Pointer to the x-axis angler velocity array */
    EI_DOUBLE     *pdRotY;      /**< Pointer to the y-axis angler velocity array */
    EI_DOUBLE     *pdRotZ;      /**< Pointer to the z-axis angler velocity array */
    EI_S64        *ps64Time;    /* Pointer to the time stamp array */
    EI_U32         u32Num;      /**< Number of valid data */
}EI_MADP_CAMERA_DIS_GYRO_DATA_S;

typedef enum eiEN_CAMERA_ERR_CODE_E
{
    MADP_EN_CAMERA_INVALID_FD = 0x40,
    MADP_EN_CAMERA_IOCTL_FAIL = 0x41,
    MADP_EN_CAMERA_OVERRANGE = 0x42,
    MADP_EN_CAMERA_NOT_INITED = 0x43,
    MADP_EN_CAMERA_NOT_STARTED = 0x44
}EN_CAMERA_ERR_CODE_E;

/** Null pointer error for camera*/
#define EI_ERR_MAI_CAMERA_NULL_PTR                   EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NULL_PTR)
/** illegal parameter error for camera*/
#define EI_ERR_MAI_CAMERA_ILLEGAL_PARA               EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_ILLEGAL_PARAM)
/** invalid fd error for camera*/
#define EI_ERR_MAI_CAMERA_INVALID_FD                 EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_CAMERA_INVALID_FD)
/** ioctl fail error for camera*/
#define EI_ERR_MAI_CAMERA_IOCTL_FAIL                 EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_CAMERA_IOCTL_FAIL)
/** not support error for camera*/
#define EI_ERR_MAI_CAMERA_NOTSUPPORT                 EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NOT_SUPPORT)
/** overrange error for camera*/
#define EI_ERR_MAI_CAMERA_OVERRANGE                  EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_CAMERA_OVERRANGE)
/** not inited error for camera*/
#define EI_ERR_MAI_CAMERA_NOT_INITED                 EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_CAMERA_NOT_INITED)
/** not start error for camera*/
#define EI_ERR_MAI_CAMERA_NOT_STARTED                EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_CAMERA_NOT_STARTED)
/** no memery for camera*/
#define EI_ERR_MAI_CAMERA_NOMEM                      EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NOMEM)
/** not permit*/
#define EI_ERR_MAI_CAMERA_NOT_PERM                   EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_NOT_PERM)
/** not exist*/
#define EI_ERR_MAI_CAMERA_UNEXIST                    EI_MADP_DEF_ERR(EI_MADP_MOD_CAMERA,MADP_EN_ERR_LEVEL_ERROR,MADP_EN_ERR_UNEXIST)
/** @}*/  /** <!-- ==== CAMERA End ====*/

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* End of #ifdef __cplusplus */

#endif /* End of #ifndef __EI_MAI_CAMERA_DEFINE_H__ */
